/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.velocityme.session;

import com.velocityme.entity.Activity;
import com.velocityme.entity.ChangeDelta;
import com.velocityme.entity.Time;
import java.io.File;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author rcrida
 */
@Local
public interface ActivityLocal {

    void logCreate(KeyLocal key, Activity activity, ChangeDelta changeDelta, boolean interested);

    void logEdit(KeyLocal key, Activity activity, Activity current, ChangeDelta changeDelta);

    int getRemainingDuration_min(Activity activity, Date stop);

    List<Time> getTimeAfterDate(KeyLocal key, Activity activity, Date date);

    void changeState(KeyLocal key, long activityId, long transitionId, String message, byte percentageComplete, File file, String contentType, InputStream stream);

    Activity findActivity(KeyLocal key, Long activityId);

    void createTime(KeyLocal key, Time time, byte percentageComplete);

    void editTime(KeyLocal key, Time time, byte percentageComplete);

    void deleteTime(KeyLocal key, Long timeId);

    Time findTime(KeyLocal key, Long timeId);
}
